package architect;

import org.apache.commons.lang3.StringUtils;

import java.util.function.Consumer;

/**
 * @title: JavaConsumer
 * @description:
 * @author: guanxin
 * @date: 2019-11-09 11:49
 * @since: Jdk8
 */

public class JavaConsumer {

    public static void main(String[] args) {
        test1.accept("guanxin");
        test1.andThen(test2).accept("guanxin");
    }

    private static Consumer<String> test1 = t -> System.out.println(StringUtils.upperCase(t));

    private static Consumer<String> test2 = t -> System.out.println(StringUtils.lowerCase(t));
}
